<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>跨域请求之服务器代理</title>
</head>
<body>
    <h1>跨域请求之服务器代理</h1>
    
    <script>
        document.addEventListener('DOMContentLoaded',function(){
            let xhr = new XMLHttpRequest();
            xhr.onload = function(){
                console.log('data=',xhr.responseText);
            }
            // xhr.open('get','https://offer.qfh5.cn/api/iq?sort=hot',true);
            xhr.open('get','/api/mst/iq?sort=hot',true);
            xhr.send();
        })

    </script>
</body>
</html>